<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>chracter.php</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<?php
set_include_path(get_include_path() . ':' . dirname(__FILE__) . '/../library');

require_once 'Wow/Armory/App/SetUp.php';
require_once 'Wow/Armory/App/Autoload.php';

$app = new Wow_Armory_App_SetUp();
$app->loadEnvironment(Wow_Armory_App_SetUp::DEVELOPMENT)
    ->loadExceptionClass()
    ->loadLibrary();

try {
    $cache = new Wow_Armory_Core_Cache_File(array(
        'dir' => dirname(__FILE__) . '/../data/cache',
        'suffix' => 'wowArmory-----',
        'automaticSerialize' => true
    ));
    
    $config = new Wow_Armory_Config(true);
    $config->setRealm(new Wow_Armory_Realm('Festung der Stürme'))
           ->setCharacter(new Wow_Armory_Character('Ahrian'))
           ->setLocation(Wow_Armory_Config::EU)
           ->setCache(true)
           ->setCacheHandler($cache);
    $parse  = new Wow_Armory_Parse(Wow_Armory_Parse::CHARACTER, $config);
    $parse->addHandler(new Wow_Armory_Handler_Default());
    $result = $parse->fetch();
    $default = $result->getResult('Wow_Armory_Handler_Default');
} catch (Wow_Armory_Exception $e) {
    var_dump($e->getCode());
}
?>
</body>
</html>